package controllers;

import play.mvc.Before;
import play.mvc.Controller;
import play.mvc.With;

@With(Secure.class)
public class SecuredController extends Controller {
	
	@Before
    static void checkConnected() {
        if(Auth.getUser() == null) {
            Application.login();
        } else {
            renderArgs.put("user", Auth.getEmail());
            session.put("username", Auth.getEmail());
        }
    }
	
}
